<?php

namespace app\selladmin\model;

use think\Model;

class StoreSaveRecord extends Model {

    //记录类型 
    const TYPE_1 = 1; //移动端
    const TYPE_2 = 2; //后台

    //写入记录

    public function insertRecord($store_id, $old, $new) {
        $data = [
            'type' => StoreSaveRecord::TYPE_2,
            'store_id' => $store_id,
            'old' => $old,
            'new' => $new,
            'add_time' => time(),
        ];
        $result = StoreSaveRecord::insert($data);
        return $result;
    }

}
